package com.ruoyi.web.controller.kaoyan.vo;

import com.ruoyi.kaoyan.domain.EducationChoicePlan;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PlanVo {

    private Long id;

    private Long userId;

    private String userName;

    private String targetCity;

    private String nowSchoolName;

    private String targetSchoolName;

    private String nowMajorName;

    private String targetMajorName;

    private Integer targetMajorCode;

    public PlanVo(EducationChoicePlan plan, Map<Long, String> map){
        this.id = plan.getId();
        this.userId = plan.getUserId();
        this.targetCity = plan.getTargetCity();
        this.targetMajorName = plan.getTargetMajorName();
        this.nowMajorName = plan.getNowMajorName();
        this.nowSchoolName = plan.getNowSchoolName();
        this.userName = map.get(plan.getUserId());
        this.targetMajorCode = plan.getTargetMajorCode();
        this.targetSchoolName = plan.getTargetSchoolName();
    }
}
